<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>专题-{{$SEO['title']}}</title>
    <meta name="keywords" content="{{$SEO['keywords']}}"/>
    <meta name="description" content="{{$SEO['description']}}"/>

    <!--公用css引用-->
    @include('front.common.style')
            <!--END/公用css引用-->
    <link rel="stylesheet" href="../dist/css/index.css">
    <style>
        .zt-bg-1{ background: url(../images/zt/zt-bg-1.jpg) no-repeat center top #0a052d;padding-top: 500px;padding-bottom:40px;margin-bottom: -30px;}
        .list-title{ background: url(../images/zt/zt-tit-bg.png) no-repeat center transparent;line-height: 37px;;font-size: 28px;color:#fff;}
    </style>
</head>
<body>

<!--公共头部-->

@include('front.common.header')
        <!--END/公共头部-->

@inject('pictureService','App\Interfaces\PictureService')
@inject('activityService','App\Interfaces\ActivityService')
@inject('goodsService','App\Interfaces\GoodsService')
@inject('shopService','App\Interfaces\ShopService')
@inject('userCollectionService','App\Interfaces\UserCollectionService')

        <!--基本护肤-->
<div class="zt-bg-1 fn-rel">

    <div class="inbox fn-rel" style="overflow: visible;">

        @foreach ($activityService->getActivityCat($id) as $k=>$activityCat )


            <div id="floor-{{$activityCat->id}}" class="list-title fn-tc fn-mb12 fn-mt30">
                <strong>{{$activityCat->cat_name}}</strong>
            </div>

            <div class="list-body">
                <ul class="imglist-2 ui-cols-4 imglist-2-ver imglist-skin-2">

                    @foreach ($activityService->getActivityGoods($activityCat->id) as $key=>$activityGoods)
                        @if($activityGoods->is_on_sale ==1)
                            <?php
                            $goods = $goodsService->get($activityGoods->goods_id);
                            if($goods){
                            $shop= $shopService->get($goods->shop_id);
                            $goodsInCollection=isset($user)?$userCollectionService->isInCollection($user->id,'GOODS',$goods->goods_id):false;
                            ?>
                            <li class="col col-space">
                                <div class="col-box">
                                    <div class="col-l">
                                        <a href="/goods/{{$goods->goods_id}}">
                                            <img class="lazy img-lazyload" data-src="{{$pictureService::thumb($goods->goods_thumb,254,254)}}" alt="">
                                        </a>

                                        @if($goods->goods_number==0)
                                            <i class="icon icon-soldout"></i>
                                        @endif
                                    </div>
                                    <div class="col-r">
                                        <div class="panel-body">
                                            @if($goodsInCollection)
                                                <a href="javascript:;" class="fav-link fav"><i class="icon icon-fav"></i>已收藏</a>
                                            @else
                                                <a href="javascript:;" class="J-add-collection fav-link" reference_id="{{$goods->goods_id}}" collection-type="GOODS"><i class="icon icon-noFav"></i>收藏</a>
                                            @endif

                                            <p>
                                                <span class="text-color-1 font-14 fn-mr4">￥<span class="font-24">{{$goods->shop_price}}</span></span>
                                                @if($goods->shop_price>=60)
                                                    <span class="bl-label label-brd-red fn-mb8">包邮</span>
                                                @endif
                                                <del class="fn-fr font-14 fn-mt6 fn-hide">￥{{$goods->market_price}}</del>
                                            </p>
                                            <a class="tit link fn-dib-otw ui-100" href="/goods/{{$goods->goods_id}}" target="_blank" title="{{$goods->goods_name}}">{{$goods->goods_name}}</a>
                                            <p class="sub-tit fn-dib-otw" title="{{$goods->goods_pet_name}}">{{$goods->goods_pet_name}}&nbsp;</p>
                                            <p>
                                                @if($shop->shop_name=='阿福易购')
                                                    <a href="/shop/{{$goods->shop_id}}" target="_blank">{{$shop->shop_name}}</a><span class="bl-label fn-ml4">自营</span>
                                                @else
                                                    <a href="/shop/{{$goods->shop_id}}" target="_blank">{{$shop->shop_name}}旗舰店</a>
                                                @endif
                                            </p>

                                        </div>
                                    </div>
                                </div>
                            </li>
                            <?php }?>
                        @endif
                    @endforeach

                </ul>
            </div>
        @endforeach


    </div>

    <!--右侧浮动导航-->
    <div id="rightBar" class="right-bar2">
        <ul>


            @foreach ($activityService->getActivityCat($id) as $k=>$activityCat )

                <li>
                    <a href="#floor-{{$activityCat->id}}">
                        <p class="text">{{$activityCat->cat_name}}</p>
                        <span class="borb"></span>
                    </a>
                </li>
            @endforeach

            <li class="go-top">
                <a href="#" title="返回顶部">
                    <i class="icon icon-bar-13"></i>
                </a>
            </li>
        </ul>
    </div>
    <!--END/右侧浮动导航-->

</div>
<!--END/基本护肤-->


<!--公共尾部-->
@include('front.common.footer')
        <!--END/公共尾部-->


<!--公用js引用-->
@include('front.common.script')
        <!--END/公用js引用-->

<script src="../dist/js/responsiveslides.min.js"></script>
<script src="../dist/js/home.js"></script>
</body>
</html>